<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('user_account', function (Blueprint $table) {
            $table->string('name', 32)->comment('姓名')->default('');
            $table->string('idcard', 64)->comment('身份证号码')->default('');
            $table->integer('authenticate_time')->comment('实名认证时间')->unsigned()->default(0);
            $table->integer('phone_bind_time')->comment('手机号码绑定时间')->unsigned()->default(0);
            $table->integer('last_login_time')->comment('最后登录时间')->unsigned()->default(0);

            $table->index('idcard');
            $table->index('authenticate_time');
            $table->index('phone_bind_time');
            $table->index('last_login_time');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
};
